<nz-spin [nzSpinning]="loading">
<nz-descriptions [nzTitle]="sql.sqlTitle" [nzBordered]="true" [nzSize]="'small'" [nzExtra]="buttons">
  <nz-descriptions-item nzTitle="产品">{{sql.productName}}</nz-descriptions-item>
  <nz-descriptions-item nzTitle="schema" [nzSpan]="2">{{sql.schemaName}}</nz-descriptions-item>
  <nz-descriptions-item nzTitle="sql" [nzSpan]="3">
    <div nz-row>
      <div [nzSm]="24" [nzXs]="24" nz-col class="sql-text-div" #editor>
      </div>
    </div>
  </nz-descriptions-item>
  <nz-descriptions-item nzTitle="备注" [nzSpan]="3">{{sql.remark}}</nz-descriptions-item>
  <nz-descriptions-item nzTitle="项目" [nzSpan]="3">
    <div  nz-row>
      <div *ngFor="let u of sql.use" nz-col [nzSm]="24" [nzXs]="24">
        {{u.projectName}}
      </div>
    </div>
  </nz-descriptions-item>
</nz-descriptions>
<ng-template #buttons>
  <nz-button-group >
    <button nz-button nzType="primary" routerLink="../"><i nz-icon nzType="left"></i>返回</button>
    <button nz-button nzType="primary" (click)="copySql()"><i nz-icon nzType="copy"></i>复制sql</button>
  </nz-button-group>
</ng-template>
</nz-spin>
